import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/Denglu",
  },
  {
    path: "/Denglu",
    name: "Denglu",
    component: () => import("../views/Denglu/index.vue"),
  },
  {
    path: "/Pyonghu",
    name: "Pyonghu",
    component: () => import("../views/Pyonghu/index.vue"),
  },
  {
    path: "/Gyonghu",
    name: "Gyonghu",
    component: () => import("../views/Gyonghu/index.vue"),
  },
  //Gindex管理员Gindex
  {
    path: "/Gindex",
    name: "Gindex",
    redirect: "/Gong",
    component: () => import("../views/Gindex/index.vue"),
    children: [
      // 工作台
      {
        path: "/Gong",
        name: "Gong",
        component: () => import("../views/Gong/index.vue"),
      },
      // 商品
      {
        path: "/Shang1",
        name: "Shang1",
        component: () => import("../views/Shang1/index.vue"),
      },
      {
        path: "/Shang2",
        name: "Shang2",
        component: () => import("../views/Shang2/index.vue"),
      },
      {
        path: "/Shang3",
        name: "Shang3",
        component: () => import("../views/Shang3/index.vue"),
      },
      {
        path: "/Shang4",
        name: "Shang4",
        component: () => import("../views/Shang4/index.vue"),
      },

      // 营销
      {
        path: "/Yingx1",
        name: "Yingx1",
        component: () => import("../views/Yingx1/index.vue"),
      },
      {
        path: "/Yingx2",
        name: "Yingx2",
        component: () => import("../views/Yingx2/index.vue"),
      },
      {
        path: "/Yingx3",
        name: "Yingx3",
        component: () => import("../views/Yingx3/index.vue"),
      },
      {
        path: "/Yingx4",
        name: "Yingx4",
        component: () => import("../views/Yingx4/index.vue"),
      },
      {
        path: "/YangMaos1",
        name: "YangMaos1",
        component: () => import("../views/YangMaos1/index.vue"),
      },
      {
        path: "/YangMaos2",
        name: "YangMaos2",
        component: () => import("../views/YangMaos2/index.vue"),
      },
      // 订单
      {
        path: "/Ding1",
        name: "Ding1",
        component: () => import("../views/Ding1/index.vue"),
      },
      {
        path: "/Ding2",
        name: "Ding2",
        component: () => import("../views/Ding2/index.vue"),
      },
      {
        path: "/Ding3",
        name: "Ding3",
        component: () => import("../views/Ding3/index.vue"),
      },
      {
        path: "/Ding4",
        name: "Ding4",
        component: () => import("../views/Ding4/index.vue"),
      },
      // 团长
      {
        path: "/Tuan1",
        name: "Tuan1",
        component: () => import("../views/Tuan1/index.vue"),
      },
      {
        path: "/Tuan2",
        name: "Tuan2",
        component: () => import("../views/Tuan2/index.vue"),
      },
      {
        path: "/Tuan3",
        name: "Tuan3",
        component: () => import("../views/Tuan3/index.vue"),
      },
      {
        path: "/Tuan4",
        name: "Tuan4",
        component: () => import("../views/Tuan4/index.vue"),
      },
      {
        path: "/Tuan5",
        name: "Tuan5",
        component: () => import("../views/Tuan5/index.vue"),
      },
      // 门店
      {
        path: "/Men1",
        name: "Men1",
        component: () => import("../views/Men1/index.vue"),
      },
      {
        path: "/Men2",
        name: "Men2",
        component: () => import("../views/Men2/index.vue"),
      },
      {
        path: "/Men3",
        name: "Men3",
        component: () => import("../views/Men3/index.vue"),
      },
      {
        path: "/Men4",
        name: "Men4",
        component: () => import("../views/Men4/index.vue"),
      },
      {
        path: "/Men5",
        name: "Men5",
        component: () => import("../views/Men5/index.vue"),
      },
      {
        path: "/Men6",
        name: "Men6",
        component: () => import("../views/Men6/index.vue"),
      },
      {
        path: "/Men7",
        name: "Men7",
        component: () => import("../views/Men7/index.vue"),
      },
      // 仓库
      {
        path: "/Chang1",
        name: "Chang1",
        component: () => import("../views/Chang1/index.vue"),
      },
      {
        path: "/Chang2",
        name: "Chang2",
        component: () => import("../views/Chang2/index.vue"),
      },
      {
        path: "/Chang3",
        name: "Chang3",
        component: () => import("../views/Chang3/index.vue"),
      },
      {
        path: "/Chang4",
        name: "Chang4",
        component: () => import("../views/Chang4/index.vue"),
      },
      {
        path: "/Chang5",
        name: "Chang5",
        component: () => import("../views/Chang5/index.vue"),
      },
      {
        path: "/Chang6",
        name: "Chang6",
        component: () => import("../views/Chang6/index.vue"),
      },
      {
        path: "/Chang7",
        name: "Chang7",
        component: () => import("../views/Chang7/index.vue"),
      },
      {
        path: "/Chang8",
        name: "Chang8",
        component: () => import("../views/Chang8/index.vue"),
      },
      // 分销
      {
        path: "/Fen1",
        name: "Fen1",
        component: () => import("../views/Fen1/index.vue"),
      },
      {
        path: "/Fen2",
        name: "Fen2",
        component: () => import("../views/Fen2/index.vue"),
      },
      {
        path: "/Fen3",
        name: "Fen3",
        component: () => import("../views/Fen3/index.vue"),
      },
      {
        path: "/Fen4",
        name: "Fen4",
        component: () => import("../views/Fen4/index.vue"),
      },
      {
        path: "/Fen5",
        name: "Fen5",
        component: () => import("../views/Fen5/index.vue"),
      },
      {
        path: "/Fen6",
        name: "Fen6",
        component: () => import("../views/Fen6/index.vue"),
      },
      // 小程序
      {
        path: "/Xiaoc1",
        name: "Xiaoc1",
        component: () => import("../views/Xiaoc1/index.vue"),
      },
      // 权限
      {
        path: "/Quan1",
        name: "Quan1",
        component: () => import("../views/Quan1/index.vue"),
      },
      {
        path: "/Quan2",
        name: "Quan2",
        component: () => import("../views/Quan2/index.vue"),
      },
      {
        path: "/Quan3",
        name: "Quan3",
        component: () => import("../views/Quan3/index.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
